public class MethodDemo06 {
    public static void main(String[] args) {
        int result = smallZhiNum(10);
        System.out.println(result);

    }


    public static int smallZhiNum(int num) {
        while (true) {
            num++;//91
            boolean flag = true;
            for (int i = 2; i < num; i++) {
                if (num % i == 0) {
                    flag = false;
                    break;
                }
            }

            if (flag) {
                return num;
            }
        }
    }


}
